package com.hyst.domain;

import java.util.Date;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.datetime.DateFormatter;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 正式课上课表（排课表）实体
 */
@Data
@ApiModel(value = "正式课上课表（排课表）", description = "")

public class CurriculumSchedule implements Cloneable {
//	public final int COMPLETED=7;
//	public final int NO_CLASS=1;
//	public final int STUDENT_ON_LEAVE=2;
//	public final int STUDENT_ABSENT=3;
//	public final int TEACHER_ON_LEAVE=4;
//	public final int TEACHER_ABSENT=5;
//	public final int MAKE_UP_CLASS=6;
//	public final int DEFAULT=0;

	@Id
	@ApiModelProperty(value = "id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	@ApiModelProperty(value = "购买课程ID")
	private String purchaseCourseId;

	@ApiModelProperty(value = "上课日期")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date classDate;

	@ApiModelProperty(value = "周几")
	private Integer classWeek;

	@ApiModelProperty(value = "上课时间（开始）")
	private String classTime;

	@ApiModelProperty(value = "上课结束时间")
	private String classTimeEnd;

	@ApiModelProperty(value = "课程时长（单位分钟）")
	private Integer classLength;

	@ApiModelProperty(value = "教材")
	private String material;

	@ApiModelProperty(value = "状态")
	private Integer state;

	@ApiModelProperty(value = "教师ID")
	private String teacherId;

	@ApiModelProperty(value = "教师评语（上课表现）")
	private String performance;

	@ApiModelProperty(value = "作业")
	private String homework;

	@ApiModelProperty(value = "预习")
	private String contentNextLecture;

	@ApiModelProperty(value = "上课视频")
	private String zoomVideo;

	@ApiModelProperty(value = "is_delete")
	private Integer isDelete;

	@ApiModelProperty(value = "学生ID")
	private String studentId;

	@ApiModelProperty(value = "教材级别")
	private Integer materialLevel;

	private String type;

	private String video;

	// 排序方式
	@Transient
	private String sort = "DESC";

	@Transient
	private int pageNum = 1;

	@Transient
	private int pageSize = Integer.MAX_VALUE;

	@Override
	public CurriculumSchedule clone() throws CloneNotSupportedException {
		return (CurriculumSchedule) super.clone();
	}
//    @InitBinder
//    public void intDate(WebDataBinder dataBinder){
//        dataBinder.addCustomFormatter(new DateFormatter("yyyy-MM-dd HH:mm:ss"), "classDate");
//    }


}
